class myPromise {
    static PENDING = 'pending'
    static FULFILLED = 'fulfilled'
    static REJECTED = 'rejected'
    constructor(executor) {
        this.status = myPromise.PENDING
        this.value = null
        executor(this.resolve.bind(this), this.reject.bind(this))
    }
    resolve(value) {
        this.status = myPromise.FULFILLED
        this.value = value
    }
    reject(reason) {
        this.status = myPromise.REJECTED
        this.value = reason
    }
}